$(document).ready(function(){//刷新页面关闭所有dialog窗口
    var dialog_data = $("body").data();//当前打开dialog信息
    $.each(dialog_data, function(i, n){
        $.pdialog.close(i);
    });
	
	//排序值在table里面修改操作
	$('._editSort').die().live('click',function(){
		var _self = $(this);
		//当前数值
		var curr_sort_val = parseInt(_self.text());
		var action_str = _self.attr('data-action') ? _self.attr('data-action') : 'ajaxEditSort';
		//获取表单地址 便于统一提交操作
		var form_url = $('#pagerForm').attr('action') + '&a=' + action_str;
		//插入指定input输入框 data-sort=xx 当前排序值（提交时比对）
		
	});
});

//js parse_url 方法
function parseURL(url) {
    var a = document.createElement('a');
    a.href = url;
    return {
        source: url,
        protocol: a.protocol.replace(':', ''),
        host: a.hostname,
        port: a.port,
        query: a.search,
        params: (function () {
            var ret = {},
                seg = a.search.replace(/^\?/, '').split('&'),
                len = seg.length, i = 0, s;
            for (; i < len; i++) {
                if (!seg[i]) {
                    continue;
                }
                s = seg[i].split('=');
                ret[s[0]] = s[1];
            }
            return ret;
        })(),
        file: (a.pathname.match(/\/([^\/?#]+)$/i) || [, ''])[1],
        hash: a.hash.replace('#', ''),
        path: a.pathname.replace(/^([^\/])/, '/$1'),
        relative: (a.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ''])[1],
        segments: a.pathname.replace(/^\//, '').split('/')
    };
}